package org.rslai.tcedit.domain;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToOne;
import org.hibernate.validator.Length;

/**
 * 测试计划
 * 
 * @author rslai
 */
@MappedSuperclass
public class TestPlan extends UUIDSupport {

	private Version version; // 版本信息
	private String name; // 测试计划名称
	private String describing; // 测试计划描述
	private boolean closed = false; // 测试计划是否已关闭
	private Date createDate; // 测试计划创建时间

	@OneToOne
	@JoinColumn(nullable = false, updatable = true, unique = false)
	public Version getVersion() { return version; }
	public void setVersion(Version version) { this.version = version; }

	@Column(nullable = false, length = 50)
	@Length(max = 50, message = "测试计划名称请限制在50字以内")
	public String getName() { return name; }
	public void setName(String name) { this.name = name; }

	@Column(nullable = true, length = 100)
	@Length(max = 100, message = "测试计划描述请限制在100字以内")
	public String getDescribing() { return describing; }
	public void setDescribing(String describing) { this.describing = describing; }

	@Column(nullable = false)
	public Boolean getClosed() { return closed; }
	public void setClosed(Boolean closed) { this.closed = closed; }

	@Column(nullable = false)
	public Date getCreateDate() { return createDate; }
	public void setCreateDate(Date createDate) { this.createDate = createDate; }

}
